package com.kcsj.demo.Mapper;

import com.kcsj.demo.Module.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Insert("insert into user_inf(name,company,telephone_number) values(#{name},#{company},#{telephoneNumber})")
    void insert(User user);

    @Select("select * from user_inf")
    List<User> list();

    @Delete("delete from user_inf where name=#{name}")
    void delete(String name);
}
